Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sort attributes when building xml.dom.minidom.Element objects #415

Merged
merged 1 commit into from
Jan 8, 2020

Conversation

lognaturel
Copy link
Contributor

@lognaturel lognaturel commented Jan 8, 2020

Fixes failing tests on Python 3.8.1.

I have run all tests on Python 3.7.2 and Python 3.8.1.

#412 forced an alphanumeric ordering of attributes when generating XML from test cases. When attributes have namespaces, attribute order is different between these two cases:

  • XML generated from test cases when using assertPyxformXform
  • XML that is output when running pyxform in other contexts

This has been filed at #414. It means that #412 fixed the tests that use assertPyxformXform but not the tests that actually generate real XML output.

This PR sorts attributes when building the true XML output.

@codecov-io
Copy link

codecov-io commented Jan 8, 2020

Codecov Report

Merging #415 into master will increase coverage by 0.21%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #415      +/-   ##
==========================================
+ Coverage   82.36%   82.58%   +0.21%     
==========================================
  Files          23       23              
  Lines        3323     3364      +41     
  Branches      781      781              
==========================================
+ Hits         2737     2778      +41     
  Misses        440      440              
  Partials      146      146
Impacted Files Coverage Δ
pyxform/survey_element.py 90.08% <0%> (+0.08%) ⬆️
pyxform/xform2json.py 79.33% <0%> (+0.08%) ⬆️
pyxform/survey.py 90.33% <0%> (+0.16%) ⬆️
pyxform/validators/util.py 76.04% <0%> (+0.25%) ⬆️
pyxform/builder.py 75.39% <0%> (+0.52%) ⬆️
pyxform/validators/updater.py 83.11% <0%> (+1.1%) ⬆️
pyxform/validators/error_cleaner.py 85.41% <0%> (+2.08%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 23f081c...3d28313. Read the comment docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants